Optimal. Leaf size=124 \[ \frac {a \, _2F_1\left (1,\frac {1+m}{2};\frac {3+m}{2};-\tan ^2(c+d x)\right ) \tan ^{1+m}(c+d x)}{d (1+m)}+\frac {b \cos ^2(c+d x)^{\frac {1+m}{2}} \, _2F_1\left (\frac {1+m}{2},\frac {1}{2} (1+m+n);\frac {1}{2} (3+m+n);\sin ^2(c+d x)\right ) \sin ^n(c+d x) \tan ^{1+m}(c+d x)}{d (1+m+n)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 124, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3313, 3557,
371, 2682, 2657} \begin {gather*} \frac {a \tan ^{m+1}(c+d x) \, _2F_1\left (1,\frac {m+1}{2};\frac {m+3}{2};-\tan ^2(c+d x)\right )}{d (m+1)}+\frac {b \cos ^2(c+d x)^{\frac {m+1}{2}} \tan ^{m+1}(c+d x) \sin ^n(c+d x) \, _2F_1\left (\frac {m+1}{2},\frac {1}{2} (m+n+1);\frac {1}{2} (m+n+3);\sin ^2(c+d x)\right )}{d (m+n+1)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 371
Rule 2657
Rule 2682
Rule 3313
Rule 3557
Rubi steps
\begin {align*} \int \left (a+b \sin ^n(c+d x)\right ) \tan ^m(c+d x) \, dx &=\int \left (a \tan ^m(c+d x)+b \sin ^n(c+d x) \tan ^m(c+d x)\right ) \, dx\\ &=a \int \tan ^m(c+d x) \, dx+b \int \sin ^n(c+d x) \tan ^m(c+d x) \, dx\\ &=\frac {a \text {Subst}\left (\int \frac {x^m}{1+x^2} \, dx,x,\tan (c+d x)\right )}{d}+\left (b \cos ^{1+m}(c+d x) \sin ^{-1-m}(c+d x) \tan ^{1+m}(c+d x)\right ) \int \cos ^{-m}(c+d x) \sin ^{m+n}(c+d x) \, dx\\ &=\frac {a \, _2F_1\left (1,\frac {1+m}{2};\frac {3+m}{2};-\tan ^2(c+d x)\right ) \tan ^{1+m}(c+d x)}{d (1+m)}+\frac {b \cos ^2(c+d x)^{\frac {1+m}{2}} \, _2F_1\left (\frac {1+m}{2},\frac {1}{2} (1+m+n);\frac {1}{2} (3+m+n);\sin ^2(c+d x)\right ) \sin ^n(c+d x) \tan ^{1+m}(c+d x)}{d (1+m+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 6 vs. order 5 in
optimal.
time = 12.46, size = 1065, normalized size = 8.59 \begin {gather*} \frac {2 \left (a+b \sin ^n(c+d x)\right ) \left (a (1+m+n) F_1\left (\frac {1+m}{2};m,1;\frac {3+m}{2};\tan ^2\left (\frac {1}{2} (c+d x)\right ),-\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )+b (1+m) F_1\left (\frac {1}{2} (1+m+n);m,1+n;\frac {1}{2} (3+m+n);\tan ^2\left (\frac {1}{2} (c+d x)\right ),-\tan ^2\left (\frac {1}{2} (c+d x)\right )\right ) \sec ^2\left (\frac {1}{2} (c+d x)\right )^n \sin ^n(c+d x)\right ) \tan \left (\frac {1}{2} (c+d x)\right ) \tan ^m(c+d x)}{d \left (\sec ^2\left (\frac {1}{2} (c+d x)\right ) \left (a (1+m+n) F_1\left (\frac {1+m}{2};m,1;\frac {3+m}{2};\tan ^2\left (\frac {1}{2} (c+d x)\right ),-\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )+b (1+m) F_1\left (\frac {1}{2} (1+m+n);m,1+n;\frac {1}{2} (3+m+n);\tan ^2\left (\frac {1}{2} (c+d x)\right ),-\tan ^2\left (\frac {1}{2} (c+d x)\right )\right ) \sec ^2\left (\frac {1}{2} (c+d x)\right )^n \sin ^n(c+d x)\right )-16 m \cos \left (\frac {1}{2} (c+d x)\right ) \csc ^3(c+d x) \sec (c+d x) \sin ^5\left (\frac {1}{2} (c+d x)\right ) \left (a (1+m+n) F_1\left (\frac {1+m}{2};m,1;\frac {3+m}{2};\tan ^2\left (\frac {1}{2} (c+d x)\right ),-\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )+b (1+m) F_1\left (\frac {1}{2} (1+m+n);m,1+n;\frac {1}{2} (3+m+n);\tan ^2\left (\frac {1}{2} (c+d x)\right ),-\tan ^2\left (\frac {1}{2} (c+d x)\right )\right ) \sec ^2\left (\frac {1}{2} (c+d x)\right )^n \sin ^n(c+d x)\right )+2 m \csc (c+d x) \sec (c+d x) \left (a (1+m+n) F_1\left (\frac {1+m}{2};m,1;\frac {3+m}{2};\tan ^2\left (\frac {1}{2} (c+d x)\right ),-\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )+b (1+m) F_1\left (\frac {1}{2} (1+m+n);m,1+n;\frac {1}{2} (3+m+n);\tan ^2\left (\frac {1}{2} (c+d x)\right ),-\tan ^2\left (\frac {1}{2} (c+d x)\right )\right ) \sec ^2\left (\frac {1}{2} (c+d x)\right )^n \sin ^n(c+d x)\right ) \tan \left (\frac {1}{2} (c+d x)\right )+2 (1+m) \tan \left (\frac {1}{2} (c+d x)\right ) \left (b n F_1\left (\frac {1}{2} (1+m+n);m,1+n;\frac {1}{2} (3+m+n);\tan ^2\left (\frac {1}{2} (c+d x)\right ),-\tan ^2\left (\frac {1}{2} (c+d x)\right )\right ) \cos (c+d x) \sec ^2\left (\frac {1}{2} (c+d x)\right )^n \sin ^{-1+n}(c+d x)+\frac {a (1+m+n) \left (-F_1\left (\frac {3+m}{2};m,2;\frac {5+m}{2};\tan ^2\left (\frac {1}{2} (c+d x)\right ),-\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )+m F_1\left (\frac {3+m}{2};1+m,1;\frac {5+m}{2};\tan ^2\left (\frac {1}{2} (c+d x)\right ),-\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )\right ) \sec ^2\left (\frac {1}{2} (c+d x)\right ) \tan \left (\frac {1}{2} (c+d x)\right )}{3+m}+b n F_1\left (\frac {1}{2} (1+m+n);m,1+n;\frac {1}{2} (3+m+n);\tan ^2\left (\frac {1}{2} (c+d x)\right ),-\tan ^2\left (\frac {1}{2} (c+d x)\right )\right ) \sec ^2\left (\frac {1}{2} (c+d x)\right )^n \sin ^n(c+d x) \tan \left (\frac {1}{2} (c+d x)\right )+\frac {b (1+m+n) \left (-\left ((1+n) F_1\left (\frac {1}{2} (3+m+n);m,2+n;\frac {1}{2} (5+m+n);\tan ^2\left (\frac {1}{2} (c+d x)\right ),-\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )\right )+m F_1\left (\frac {1}{2} (3+m+n);1+m,1+n;\frac {1}{2} (5+m+n);\tan ^2\left (\frac {1}{2} (c+d x)\right ),-\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )\right ) \sec ^2\left (\frac {1}{2} (c+d x)\right )^{1+n} \sin ^n(c+d x) \tan \left (\frac {1}{2} (c+d x)\right )}{3+m+n}\right )\right )} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.73, size = 0, normalized size = 0.00 \[\int \left (a +b \left (\sin ^{n}\left (d x +c \right )\right )\right ) \left (\tan ^{m}\left (d x +c \right )\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.43, size = 23, normalized size = 0.19 \begin {gather*} {\rm integral}\left ({\left (b \sin \left (d x + c\right )^{n} + a\right )} \tan \left (d x + c\right )^{m}, x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sin ^{n}{\left (c + d x \right )}\right ) \tan ^{m}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\mathrm {tan}\left (c+d\,x\right )}^m\,\left (a+b\,{\sin \left (c+d\,x\right )}^n\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________